home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / C⁄C++ OS8 / Everything / DDocData.cp < prev    next >
Encoding:
Text File  |  1998-09-06  |  10.5 KB  |  867 lines  |  [TEXT/CWIE]

  1. // DDocData.cp -- data container class for Everything
  2.  
  3. #include "AMEngine.h"
  4. #include "PString.h"
  5. #include "DDocData.h"
  6.  
  7.  
  8. //----------
  9. DDocData::DDocData ()
  10. {
  11.     mStandard = false;
  12.     mXx = false;
  13.     mLR = false;
  14.     mLR2 = false;
  15.     mLR3 = false;
  16.     mLR4 = false;
  17.     mCheckbox = false;
  18.     mCheckbox2 = false;
  19.     mNext = false;
  20.     mNext2 = false;
  21.     mRadioGroup = 0;
  22.     mGroup = 0;
  23.     mGraphic = 0;
  24.     mBevel = 0;
  25.     mText = 0;
  26.     AssignPStr (mSmall, "\pSmall");
  27.     AssignPStr (mLarge, "\pLarge");
  28.     mX12345 = 12345;
  29.     mX12345e6 = 123.45e6;
  30.     AssignPStr (mPassword, "\pPassword");
  31.     mDate.od.eraAlt = 0;
  32.     ::GetTime (&mDate.od.oldDate);
  33.     mTime.od.eraAlt = 0;
  34.     ::GetTime (&mTime.od.oldDate);
  35.     AssignPStr (mStyled, "\p");
  36.     mBars = 1;
  37.     mStandard2 = 5;
  38.     mGraphic2 = 5;
  39.     mSlider = 5;
  40.     mTickMarks = 5;
  41.     mNonDirectional = 5;
  42.     mLittleArrows = 0;
  43.     mSpinner = 5;
  44.     mVolumeControl = 5;
  45.     mJimSSlider = 5;
  46.     mStandard3 = 5;
  47.     mIndeterminate = 0;
  48.     mChasingArrows = 0;
  49.     mRectangle = 5;
  50.     mRoundRect = 5;
  51.     mBarberPole = 0;
  52.     mRoundBarber = 0;
  53.     mTools = 0;
  54.     mFromValuesList2 = 0;
  55.     mFromMenu = 0;
  56.     mTextList = 0;
  57. }
  58.  
  59. //----------
  60. DDocData::~DDocData ()
  61. {
  62. }
  63.  
  64. //----------
  65. void    DDocData::ReadFromFile (
  66.     AMEngine*        engine)
  67. {
  68. }
  69.  
  70. //----------
  71. void    DDocData::WriteToFile (
  72.     AMEngine*        engine)
  73. {
  74. }
  75.  
  76.  
  77. //----------
  78. Boolean        DDocData::GetStandard () const
  79. {
  80.  
  81.     return mStandard;
  82. }
  83.  
  84. //----------
  85. void    DDocData::SetStandard (
  86.     Boolean        inValue)
  87. {
  88.     mStandard = inValue;
  89.     
  90.     SignalDataChanged (idStandard);
  91. }
  92.  
  93.  
  94. //----------
  95. Boolean        DDocData::GetXx () const
  96. {
  97.  
  98.     return mXx;
  99. }
  100.  
  101. //----------
  102. void    DDocData::SetXx (
  103.     Boolean        inValue)
  104. {
  105.     mXx = inValue;
  106.     
  107.     SignalDataChanged (idXx);
  108. }
  109.  
  110.  
  111. //----------
  112. Boolean        DDocData::GetLR () const
  113. {
  114.  
  115.     return mLR;
  116. }
  117.  
  118. //----------
  119. void    DDocData::SetLR (
  120.     Boolean        inValue)
  121. {
  122.     mLR = inValue;
  123.     
  124.     SignalDataChanged (idLR);
  125. }
  126.  
  127.  
  128. //----------
  129. Boolean        DDocData::GetLR2 () const
  130. {
  131.  
  132.     return mLR2;
  133. }
  134.  
  135. //----------
  136. void    DDocData::SetLR2 (
  137.     Boolean        inValue)
  138. {
  139.     mLR2 = inValue;
  140.     
  141.     SignalDataChanged (idLR2);
  142. }
  143.  
  144.  
  145. //----------
  146. Boolean        DDocData::GetLR3 () const
  147. {
  148.  
  149.     return mLR3;
  150. }
  151.  
  152. //----------
  153. void    DDocData::SetLR3 (
  154.     Boolean        inValue)
  155. {
  156.     mLR3 = inValue;
  157.     
  158.     SignalDataChanged (idLR3);
  159. }
  160.  
  161.  
  162. //----------
  163. Boolean        DDocData::GetLR4 () const
  164. {
  165.  
  166.     return mLR4;
  167. }
  168.  
  169. //----------
  170. void    DDocData::SetLR4 (
  171.     Boolean        inValue)
  172. {
  173.     mLR4 = inValue;
  174.     
  175.     SignalDataChanged (idLR4);
  176. }
  177.  
  178.  
  179. //----------
  180. Boolean        DDocData::GetCheckbox () const
  181. {
  182.  
  183.     return mCheckbox;
  184. }
  185.  
  186. //----------
  187. void    DDocData::SetCheckbox (
  188.     Boolean        inValue)
  189. {
  190.     mCheckbox = inValue;
  191.     
  192.     SignalDataChanged (idCheckbox);
  193. }
  194.  
  195.  
  196. //----------
  197. Boolean        DDocData::GetCheckbox2 () const
  198. {
  199.  
  200.     return mCheckbox2;
  201. }
  202.  
  203. //----------
  204. void    DDocData::SetCheckbox2 (
  205.     Boolean        inValue)
  206. {
  207.     mCheckbox2 = inValue;
  208.     
  209.     SignalDataChanged (idCheckbox2);
  210. }
  211.  
  212.  
  213. //----------
  214. Boolean        DDocData::GetNext () const
  215. {
  216.  
  217.     return mNext;
  218. }
  219.  
  220. //----------
  221. void    DDocData::SetNext (
  222.     Boolean        inValue)
  223. {
  224.     mNext = inValue;
  225.     
  226.     SignalDataChanged (idNext);
  227. }
  228.  
  229.  
  230. //----------
  231. Boolean        DDocData::GetNext2 () const
  232. {
  233.  
  234.     return mNext2;
  235. }
  236.  
  237. //----------
  238. void    DDocData::SetNext2 (
  239.     Boolean        inValue)
  240. {
  241.     mNext2 = inValue;
  242.     
  243.     SignalDataChanged (idNext2);
  244. }
  245.  
  246.  
  247. //----------
  248. SInt16        DDocData::GetRadioGroup () const
  249. {
  250.  
  251.     return mRadioGroup;
  252. }
  253.  
  254. //----------
  255. void    DDocData::SetRadioGroup (
  256.     SInt16        inValue)
  257. {
  258.     mRadioGroup = inValue;
  259.     
  260.     SignalDataChanged (idRadioGroup);
  261. }
  262.  
  263.  
  264. //----------
  265. SInt16        DDocData::GetGroup () const
  266. {
  267.  
  268.     return mGroup;
  269. }
  270.  
  271. //----------
  272. void    DDocData::SetGroup (
  273.     SInt16        inValue)
  274. {
  275.     mGroup = inValue;
  276.     
  277.     SignalDataChanged (idGroup);
  278. }
  279.  
  280.  
  281. //----------
  282. SInt16        DDocData::GetGraphic () const
  283. {
  284.  
  285.     return mGraphic;
  286. }
  287.  
  288. //----------
  289. void    DDocData::SetGraphic (
  290.     SInt16        inValue)
  291. {
  292.     mGraphic = inValue;
  293.     
  294.     SignalDataChanged (idGraphic);
  295. }
  296.  
  297.  
  298. //----------
  299. SInt16        DDocData::GetBevel () const
  300. {
  301.  
  302.     return mBevel;
  303. }
  304.  
  305. //----------
  306. void    DDocData::SetBevel (
  307.     SInt16        inValue)
  308. {
  309.     mBevel = inValue;
  310.     
  311.     SignalDataChanged (idBevel);
  312. }
  313.  
  314.  
  315. //----------
  316. SInt16        DDocData::GetText () const
  317. {
  318.  
  319.     return mText;
  320. }
  321.  
  322. //----------
  323. void    DDocData::SetText (
  324.     SInt16        inValue)
  325. {
  326.     mText = inValue;
  327.     
  328.     SignalDataChanged (idText);
  329. }
  330.  
  331.  
  332. //----------
  333. StringPtr    DDocData::GetSmall (
  334.     Str255        outPtr) const
  335. {
  336.  
  337.     AssignPStr (outPtr, mSmall);
  338.     return (StringPtr)mSmall;
  339. }
  340.  
  341. //----------
  342. void    DDocData::SetSmall (
  343.     Str255        inValue)
  344. {
  345.     AssignPStr (mSmall, inValue);
  346.     
  347.     SignalDataChanged (idSmall);
  348. }
  349.  
  350. //----------
  351. void    DDocData::SetSmall (
  352.     CharsHandle        inValue)
  353. {
  354.     AssignPStr (mSmall, inValue);
  355.     
  356.     SignalDataChanged (idSmall);
  357. }
  358.  
  359.  
  360. //----------
  361. StringPtr    DDocData::GetLarge (
  362.     Str255        outPtr) const
  363. {
  364.  
  365.     AssignPStr (outPtr, mLarge);
  366.     return (StringPtr)mLarge;
  367. }
  368.  
  369. //----------
  370. void    DDocData::SetLarge (
  371.     Str255        inValue)
  372. {
  373.     AssignPStr (mLarge, inValue);
  374.     
  375.     SignalDataChanged (idLarge);
  376. }
  377.  
  378. //----------
  379. void    DDocData::SetLarge (
  380.     CharsHandle        inValue)
  381. {
  382.     AssignPStr (mLarge, inValue);
  383.     
  384.     SignalDataChanged (idLarge);
  385. }
  386.  
  387.  
  388. //----------
  389. SInt32        DDocData::GetX12345 () const
  390. {
  391.  
  392.     return mX12345;
  393. }
  394.  
  395. //----------
  396. void    DDocData::SetX12345 (
  397.     SInt32        inValue)
  398. {
  399.     mX12345 = inValue;
  400.     
  401.     SignalDataChanged (idX12345);
  402. }
  403.  
  404.  
  405. //----------
  406. double        DDocData::GetX12345e6 () const
  407. {
  408.  
  409.     return mX12345e6;
  410. }
  411.  
  412. //----------
  413. void    DDocData::SetX12345e6 (
  414.     double        inValue)
  415. {
  416.     mX12345e6 = inValue;
  417.     
  418.     SignalDataChanged (idX12345e6);
  419. }
  420.  
  421.  
  422. //----------
  423. StringPtr    DDocData::GetPassword (
  424.     Str255        outPtr) const
  425. {
  426.  
  427.     AssignPStr (outPtr, mPassword);
  428.     return (StringPtr)mPassword;
  429. }
  430.  
  431. //----------
  432. void    DDocData::SetPassword (
  433.     Str255        inValue)
  434. {
  435.     AssignPStr (mPassword, inValue);
  436.     
  437.     SignalDataChanged (idPassword);
  438. }
  439.  
  440. //----------
  441. void    DDocData::SetPassword (
  442.     CharsHandle        inValue)
  443. {
  444.     AssignPStr (mPassword, inValue);
  445.     
  446.     SignalDataChanged (idPassword);
  447. }
  448.  
  449.  
  450. //----------
  451. LongDateRec        DDocData::GetDate () const
  452. {
  453.  
  454.     return mDate;
  455. }
  456.  
  457. //----------
  458. void    DDocData::SetDate (
  459.     LongDateRec        inValue)
  460. {
  461.     mDate = inValue;
  462.     
  463.     SignalDataChanged (idDate);
  464. }
  465.  
  466.  
  467. //----------
  468. LongDateRec        DDocData::GetTime () const
  469. {
  470.  
  471.     return mTime;
  472. }
  473.  
  474. //----------
  475. void    DDocData::SetTime (
  476.     LongDateRec        inValue)
  477. {
  478.     mTime = inValue;
  479.     
  480.     SignalDataChanged (idTime);
  481. }
  482.  
  483.  
  484. //----------
  485. StringPtr    DDocData::GetStyled (
  486.     Str255        outPtr) const
  487. {
  488.  
  489.     AssignPStr (outPtr, mStyled);
  490.     return (StringPtr)mStyled;
  491. }
  492.  
  493. //----------
  494. void    DDocData::SetStyled (
  495.     Str255        inValue)
  496. {
  497.     AssignPStr (mStyled, inValue);
  498.     
  499.     SignalDataChanged (idStyled);
  500. }
  501.  
  502. //----------
  503. void    DDocData::SetStyled (
  504.     CharsHandle        inValue)
  505. {
  506.     AssignPStr (mStyled, inValue);
  507.     
  508.     SignalDataChanged (idStyled);
  509. }
  510.  
  511.  
  512. //----------
  513. UInt16        DDocData::GetBars () const
  514. {
  515.  
  516.     return mBars;
  517. }
  518.  
  519. //----------
  520. void    DDocData::SetBars (
  521.     UInt16        inValue)
  522. {
  523.     mBars = inValue;
  524.     
  525.     SignalDataChanged (idBars);
  526. }
  527.  
  528.  
  529. //----------
  530. SInt16        DDocData::GetStandard2 () const
  531. {
  532.  
  533.     return mStandard2;
  534. }
  535.  
  536. //----------
  537. void    DDocData::SetStandard2 (
  538.     SInt16        inValue)
  539. {
  540.     mStandard2 = inValue;
  541.     
  542.     SignalDataChanged (idStandard2);
  543. }
  544.  
  545.  
  546. //----------
  547. SInt16        DDocData::GetGraphic2 () const
  548. {
  549.  
  550.     return mGraphic2;
  551. }
  552.  
  553. //----------
  554. void    DDocData::SetGraphic2 (
  555.     SInt16        inValue)
  556. {
  557.     mGraphic2 = inValue;
  558.     
  559.     SignalDataChanged (idGraphic2);
  560. }
  561.  
  562.  
  563. //----------
  564. SInt16        DDocData::GetSlider () const
  565. {
  566.  
  567.     return mSlider;
  568. }
  569.  
  570. //----------
  571. void    DDocData::SetSlider (
  572.     SInt16        inValue)
  573. {
  574.     mSlider = inValue;
  575.     
  576.     SignalDataChanged (idSlider);
  577. }
  578.  
  579.  
  580. //----------
  581. SInt16        DDocData::GetTickMarks () const
  582. {
  583.  
  584.     return mTickMarks;
  585. }
  586.  
  587. //----------
  588. void    DDocData::SetTickMarks (
  589.     SInt16        inValue)
  590. {
  591.     mTickMarks = inValue;
  592.     
  593.     SignalDataChanged (idTickMarks);
  594. }
  595.  
  596.  
  597. //----------
  598. SInt16        DDocData::GetNonDirectional () const
  599. {
  600.  
  601.     return mNonDirectional;
  602. }
  603.  
  604. //----------
  605. void    DDocData::SetNonDirectional (
  606.     SInt16        inValue)
  607. {
  608.     mNonDirectional = inValue;
  609.     
  610.     SignalDataChanged (idNonDirectional);
  611. }
  612.  
  613.  
  614. //----------
  615. SInt16        DDocData::GetLittleArrows () const
  616. {
  617.  
  618.     return mLittleArrows;
  619. }
  620.  
  621. //----------
  622. void    DDocData::SetLittleArrows (
  623.     SInt16        inValue)
  624. {
  625.     mLittleArrows = inValue;
  626.     
  627.     SignalDataChanged (idLittleArrows);
  628. }
  629.  
  630.  
  631. //----------
  632. SInt16        DDocData::GetSpinner () const
  633. {
  634.  
  635.     return mSpinner;
  636. }
  637.  
  638. //----------
  639. void    DDocData::SetSpinner (
  640.     SInt16        inValue)
  641. {
  642.     mSpinner = inValue;
  643.     
  644.     SignalDataChanged (idSpinner);
  645. }
  646.  
  647.  
  648. //----------
  649. SInt16        DDocData::GetVolumeControl () const
  650. {
  651.  
  652.     return mVolumeControl;
  653. }
  654.  
  655. //----------
  656. void    DDocData::SetVolumeControl (
  657.     SInt16        inValue)
  658. {
  659.     mVolumeControl = inValue;
  660.     
  661.     SignalDataChanged (idVolumeControl);
  662. }
  663.  
  664.  
  665. //----------
  666. SInt16        DDocData::GetJimSSlider () const
  667. {
  668.  
  669.     return mJimSSlider;
  670. }
  671.  
  672. //----------
  673. void    DDocData::SetJimSSlider (
  674.     SInt16        inValue)
  675. {
  676.     mJimSSlider = inValue;
  677.     
  678.     SignalDataChanged (idJimSSlider);
  679. }
  680.  
  681.  
  682. //----------
  683. SInt16        DDocData::GetStandard3 () const
  684. {
  685.  
  686.     return mStandard3;
  687. }
  688.  
  689. //----------
  690. void    DDocData::SetStandard3 (
  691.     SInt16        inValue)
  692. {
  693.     mStandard3 = inValue;
  694.     
  695.     SignalDataChanged (idStandard3);
  696. }
  697.  
  698.  
  699. //----------
  700. SInt16        DDocData::GetIndeterminate () const
  701. {
  702.  
  703.     return mIndeterminate;
  704. }
  705.  
  706. //----------
  707. void    DDocData::SetIndeterminate (
  708.     SInt16        inValue)
  709. {
  710.     mIndeterminate = inValue;
  711.     
  712.     SignalDataChanged (idIndeterminate);
  713. }
  714.  
  715.  
  716. //----------
  717. SInt16        DDocData::GetChasingArrows () const
  718. {
  719.  
  720.     return mChasingArrows;
  721. }
  722.  
  723. //----------
  724. void    DDocData::SetChasingArrows (
  725.     SInt16        inValue)
  726. {
  727.     mChasingArrows = inValue;
  728.     
  729.     SignalDataChanged (idChasingArrows);
  730. }
  731.  
  732.  
  733. //----------
  734. SInt16        DDocData::GetRectangle () const
  735. {
  736.  
  737.     return mRectangle;
  738. }
  739.  
  740. //----------
  741. void    DDocData::SetRectangle (
  742.     SInt16        inValue)
  743. {
  744.     mRectangle = inValue;
  745.     
  746.     SignalDataChanged (idRectangle);
  747. }
  748.  
  749.  
  750. //----------
  751. SInt16        DDocData::GetRoundRect () const
  752. {
  753.  
  754.     return mRoundRect;
  755. }
  756.  
  757. //----------
  758. void    DDocData::SetRoundRect (
  759.     SInt16        inValue)
  760. {
  761.     mRoundRect = inValue;
  762.     
  763.     SignalDataChanged (idRoundRect);
  764. }
  765.  
  766.  
  767. //----------
  768. SInt16        DDocData::GetBarberPole () const
  769. {
  770.  
  771.     return mBarberPole;
  772. }
  773.  
  774. //----------
  775. void    DDocData::SetBarberPole (
  776.     SInt16        inValue)
  777. {
  778.     mBarberPole = inValue;
  779.     
  780.     SignalDataChanged (idBarberPole);
  781. }
  782.  
  783.  
  784. //----------
  785. SInt16        DDocData::GetRoundBarber () const
  786. {
  787.  
  788.     return mRoundBarber;
  789. }
  790.  
  791. //----------
  792. void    DDocData::SetRoundBarber (
  793.     SInt16        inValue)
  794. {
  795.     mRoundBarber = inValue;
  796.     
  797.     SignalDataChanged (idRoundBarber);
  798. }
  799.  
  800.  
  801. //----------
  802. SInt16        DDocData::GetTools () const
  803. {
  804.  
  805.     return mTools;
  806. }
  807.  
  808. //----------
  809. void    DDocData::SetTools (
  810.     SInt16        inValue)
  811. {
  812.     mTools = inValue;
  813.     
  814.     SignalDataChanged (idTools);
  815. }
  816.  
  817.  
  818. //----------
  819. SInt16        DDocData::GetFromValuesList2 () const
  820. {
  821.  
  822.     return mFromValuesList2;
  823. }
  824.  
  825. //----------
  826. void    DDocData::SetFromValuesList2 (
  827.     SInt16        inValue)
  828. {
  829.     mFromValuesList2 = inValue;
  830.     
  831.     SignalDataChanged (idFromValuesList2);
  832. }
  833.  
  834.  
  835. //----------
  836. SInt16        DDocData::GetFromMenu () const
  837. {
  838.  
  839.     return mFromMenu;
  840. }
  841.  
  842. //----------
  843. void    DDocData::SetFromMenu (
  844.     SInt16        inValue)
  845. {
  846.     mFromMenu = inValue;
  847.     
  848.     SignalDataChanged (idFromMenu);
  849. }
  850.  
  851.  
  852. //----------
  853. SInt16        DDocData::GetTextList () const
  854. {
  855.  
  856.     return mTextList;
  857. }
  858.  
  859. //----------
  860. void    DDocData::SetTextList (
  861.     SInt16        inValue)
  862. {
  863.     mTextList = inValue;
  864.     
  865.     SignalDataChanged (idTextList);
  866. }
  867.